<template>
  <div>
  <van-nav-bar
  title="收藏列表"
  left-arrow
  @click-left="onClickLeft"
/>
    <van-card
    v-for="(item,index) in list" :key="index"

  :price="item.price"
  :desc="item.desc"
  :title="item.title"
  :thumb="'http://liufusong.top:8080'+item.houseImg"
>
 <template #tags>
    <van-tag class="tag"  plain type="danger">近地铁</van-tag>

  </template>
</van-card>

  </div>
</template>

<script>
import { getCollectionList } from '@/api/article'
export default {
  async created () {
    const { body } = await getCollectionList()
    console.log(body)
    this.list = body
  },
  data () {
    return {
      list: []
    }
  },
  methods: {
    onClickLeft () {
      console.log(1)
      this.$router.back()
    }
  }
}
</script>

<style>
.tag {
  width: 4.6vh;
  height: 2vh;
  background-color: #e1f5f8;
  border-radius: 3px;
  color: #39becd;
  padding: 4px 5px;
  font-size: 12px;
}
</style>
